package com.ruoyi.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.OrderEntity;
import com.ruoyi.employee.domain.EmployeeUser;
import com.ruoyi.customer.domain.CustomerUser;
import com.ruoyi.market.domain.ConfigBase;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品订单 tb_order_goods
 * 
 * @author ruoyi
 */
public class OrderGoods extends OrderEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单编号 */
    private String orderNo;

    /** 店员ID */
    private Long employeeUserId;

    /** 商品ID */
    private Long goodsId;

    /** 优惠券ID */
    private Long couponId;

    /** 客户优惠券ID */
    private Long customerCouponId;

    /** 分销用户ID */
    private Long distributionUserId;

    /** 商品数量 */
    private int goodsNum;

    /** 用户微信 */
    private String wxId;

    /** 店铺Id */
    private String shopId;

    /** 应用Id */
    private String appId;

    /** 店员服务时长 */
    private Long goodsUnitId;

    /** 店员服务类型 */
    private Long goodsProjectId;

    /** 店员服务等级 */
    private Long goodsLevelId;

    /** 商品标题 */
    private String goodsTitle;

    /** 接单订单状态（订单状态 wait_service-待服务 in_service-服务中 finish_service-服务完成 cancel_service-取消订单） */
    private String status;

    /** 店员性别 0=男,1=女,2=不限 */
    private String sex;

    /** 是否已评价（Y=是,N=否, 未知） */
    private String isRate;

    /** 是否已接单（Y=是,N=否, 未知） */
    private String isAccept;

    /** 支付状态 （paid-已支付 unpaid-未支付 cancel-已取消 默认unpaid） */
    private String payStatus;

    /** 取消原因 （customer-客户主动取消 employee-店员主动取消 system-后台取消 overtime-超时未结单取消 */
    private String cancelType;

    /** 是否排除接过单的店员（Y=是,N=否, 未知） */
    private String isExclude;

    /** 是否分销（Y=是,N=否, 未知） */
    private String isDistribution;

    /** 是否夜间订单（Y=是,N=否, 未知） */
    private String isNight;

    /** 是否节日订单（Y=是,N=否, 未知） */
    private String isFestival;

    /** 是否超时提醒（Y=是,N=否, 默认 N） */
    private String isOvertimeNotice;

    /** 是否超时取消（Y=是,N=否, 默认 N） */
    private String isOvertimeCancel;

    /** 接单类型（0-指定店员 1-盲盒下单 2-体验下单 3-转让单） */
    private String acceptType;

    /** 支付类型（支付类型 微信小程序-wxmp 微信公众号h5-wx_official_account 苹果app-iosapp 支付宝-alipay 余额-balance  */
    private String payType;

    /** 商品单价 */
    private BigDecimal goodsPrice;

    /** 初始金额 */
    private BigDecimal initAmount;

    /** 优惠金额 */
    private BigDecimal discountAmount;

    /** 实付金额 */
    private BigDecimal actualAmount;

    /** 分销提成金额 */
    private BigDecimal distributionAmount;

    /** 店员提成金额 */
    private BigDecimal employeeGetAmount;

    /** 最终收益金额 */
    private BigDecimal finalAmount;

    /** 持续时长 */
    private Long orderDuration;

    /** 订单开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 订单结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 超时订单取消时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date overtimeCancelTime;

    /** 超时订单提醒时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date overtimeNoticeTime;

    /** 支付参数 不写入库表 */
    private Object payParams;

    private EmployeeUser employeeUser;

    private CustomerUser customerUser;

    /** 所属店铺信息   */
    private ConfigBase shopInfo;

    public OrderGoods()
    {

    }

    public OrderGoods(String orderNo)
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo(){ return orderNo; }

    public void setOrderNo(String orderNo){ this.orderNo = orderNo; }

    public BigDecimal getGoodsPrice(){ return goodsPrice;}

    public void setGoodsPrice(BigDecimal goodsPrice){ this.goodsPrice = goodsPrice; }

    public BigDecimal getInitAmount(){ return initAmount;}

    public void setInitAmount(BigDecimal initAmount){ this.initAmount = initAmount; }

    public BigDecimal getActualAmount(){ return actualAmount;}

    public void setActualAmount(BigDecimal actualAmount){ this.actualAmount = actualAmount; }

    public BigDecimal getDiscountAmount(){ return discountAmount;}

    public void setDiscountAmount(BigDecimal discountAmount){ this.discountAmount = discountAmount; }

    public BigDecimal getDistributionAmount(){ return distributionAmount;}

    public void setDistributionAmount(BigDecimal distributionAmount){ this.distributionAmount = distributionAmount; }

    public BigDecimal getEmployeeGetAmount(){ return employeeGetAmount;}

    public void setEmployeeGetAmount(BigDecimal employeeGetAmount){ this.employeeGetAmount = employeeGetAmount; }

    public BigDecimal getFinalAmount(){ return finalAmount;}

    public void setFinalAmount(BigDecimal finalAmount){ this.finalAmount = finalAmount; }

    public int getGoodsNum(){ return goodsNum;}

    public void setGoodsNum(int goodsNum){ this.goodsNum = goodsNum; }

    public Long getCouponId(){ return couponId;}

    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCustomerCouponId(){ return customerCouponId;}

    public void setCustomerCouponId(Long customerCouponId)
    {
        this.customerCouponId = customerCouponId;
    }

    public Long getGoodsId()
    {
        return goodsId;
    }

    public void setGoodsId(Long goodsId)
    {
        this.goodsId = goodsId;
    }

    public Long getEmployeeUserId()
    {
        return employeeUserId;
    }

    public void setEmployeeUserId(Long employeeUserId)
    {
        this.employeeUserId = employeeUserId;
    }

    public Long getDistributionUserId()
    {
        return distributionUserId;
    }

    public void setDistributionUserId(Long distributionUserId)
    {
        this.distributionUserId = distributionUserId;
    }

    public String getWxId()
    {
        return wxId;
    }

    public void setWxId(String wxId)
    {
        this.wxId = wxId;
    }

    public String getAppId()
    {
        return appId;
    }

    public void setAppId(String appId)
    {
        this.appId = appId;
    }

    public String getShopId()
    {
        return shopId;
    }

    public void setShopId(String shopId)
    {
        this.shopId = shopId;
    }

    public String getIsRate()
    {
        return isRate;
    }

    public void setIsRate(String isRate)
    {
        this.isRate = isRate;
    }

    public String getIsAccept()
    {
        return isAccept;
    }

    public void setIsAccept(String isAccept)
    {
        this.isAccept = isAccept;
    }

    public String getPayStatus()
    {
        return payStatus;
    }

    public void setPayStatus(String payStatus)
    {
        this.payStatus = payStatus;
    }

    public String getCancelType()
    {
        return cancelType;
    }

    public void setCancelType(String cancelType)
    {
        this.cancelType = cancelType;
    }


    public String getIsExclude()
    {
        return isExclude;
    }

    public void setIsExclude(String isExclude)
    {
        this.isExclude = isExclude;
    }

    public String getIsDistribution(){ return isDistribution; }

    public void setIsDistribution(String isDistribution)
    {
        this.isDistribution = isDistribution;
    }

    public String getIsNight(){ return isNight; }

    public void setIsNight(String isNight)
    {
        this.isNight = isNight;
    }

    public String getIsFestival(){ return isFestival; }

    public void setIsFestival(String isFestival)
    {
        this.isFestival = isFestival;
    }

    public String getIsOvertimeNotice(){ return isOvertimeNotice; }

    public void setIsOvertimeNotice(String isOvertimeNotice)
    {
        this.isOvertimeNotice = isOvertimeNotice;
    }

    public String getIsOvertimeCancel(){ return isOvertimeCancel; }

    public void setIsOvertimeCancel(String isOvertimeCancel)
    {
        this.isOvertimeCancel = isOvertimeCancel;
    }

    public String getAcceptType()
    {
        return acceptType;
    }

    public void setAcceptType(String acceptType)
    {
        this.acceptType = acceptType;
    }

    public String getPayType()
    {
        return payType;
    }

    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getSex()
    {
        return sex;
    }

    public void setSex(String sex)
    {
        this.sex = sex;
    }

    public Long getGoodsProjectId()
    {
        return goodsProjectId;
    }

    public void setGoodsProjectId(Long goodsProjectId) { this.goodsProjectId = goodsProjectId;}

    public Long getGoodsLevelId()
    {
        return goodsLevelId;
    }

    public void setGoodsLevelId(Long goodsLevelId) { this.goodsLevelId = goodsLevelId;}

    public Long getGoodsUnitId()
    {
        return goodsUnitId;
    }

    public void setGoodsUnitId(Long goodsUnitId) { this.goodsUnitId = goodsUnitId;}

    public String getGoodsTitle()
    {
        return goodsTitle;
    }

    public void setGoodsTitle(String goodsTitle) { this.goodsTitle = goodsTitle;}

    public Long getOrderDuration()
    {
        return orderDuration;
    }

    public void setOrderDuration(Long orderDuration)
    {
        this.orderDuration = orderDuration;
    }

    public Date getStartTime()
    {
        return startTime;
    }

    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }

    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getOvertimeCancelTime()
    {
        return overtimeCancelTime;
    }

    public void setOvertimeCancelTime(Date overtimeCancelTime)
    {
        this.overtimeCancelTime = overtimeCancelTime;
    }

    public Date getOvertimeNoticeTime()
    {
        return overtimeNoticeTime;
    }

    public void setOvertimeNoticeTime(Date overtimeNoticeTime)
    {
        this.overtimeNoticeTime = overtimeNoticeTime;
    }

    public Object getPayParams()
    {
        return payParams;
    }

    public void setPayParams(Object payParams)
    {
        this.payParams = payParams;
    }

    public EmployeeUser getEmployeeUser() { return employeeUser; }

    public void setEmployeeUser(EmployeeUser employeeUser)
    {
        this.employeeUser = employeeUser;
    }

    public CustomerUser getCustomerUser() { return customerUser; }

    public void setCustomerUser(CustomerUser customerUser)
    {
        this.customerUser = customerUser;
    }

    public ConfigBase getShopInfo()
    {
        return shopInfo;
    }

    public void setShopInfo(ConfigBase shopInfo)
    {
        this.shopInfo = shopInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderNo", getOrderNo())
            .append("orderUserId", getOrderUserId())
            .append("payUserId", getPayUserId())
            .append("employeeUserId", getEmployeeUserId())
            .append("goodsId", getGoodsId())
            .append("couponId", getCouponId())
            .append("customerCouponId", getCustomerCouponId())
            .append("distributionUserId", getDistributionUserId())
            .append("goodsNum", getGoodsNum())
            .append("wxId", getWxId())
            .append("appId", getAppId())
            .append("shopId", getShopId())
            .append("goodsUnitId", getGoodsUnitId())
            .append("goodsProjectId", getGoodsProjectId())
            .append("goodsLevelId", getGoodsLevelId())
            .append("goodsTitle", getGoodsTitle())
            .append("status", getStatus())
            .append("sex", getSex())
            .append("isRate", getIsRate())
            .append("isAccept", getIsAccept())
            .append("payStatus", getPayStatus())
            .append("cancelType", getCancelType())
            .append("isExclude", getIsExclude())
            .append("isDistribution", getIsDistribution())
            .append("isNight", getIsNight())
            .append("isFestival", getIsFestival())
            .append("isOvertimeNotice", getIsOvertimeNotice())
            .append("isOvertimeCancel", getIsOvertimeCancel())
            .append("acceptType", getAcceptType())
            .append("goodsPrice", getGoodsPrice())
            .append("initAmount", getInitAmount())
            .append("actualAmount", getActualAmount())
            .append("discountAmount", getDiscountAmount())
            .append("distributionAmount", getDistributionAmount())
            .append("employeeGetAmount", getEmployeeGetAmount())
            .append("finalAmount", getFinalAmount())
            .append("appId", getAppId())
            .append("appType", getAppType())
            .append("payType", getPayType())
            .append("openId", getOpenId())
            .append("platform", getPlatForm())
            .append("delFlag", getDelFlag())
            .append("shopInfo", getShopInfo())
            .append("orderDuration", getOrderDuration())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("overtimeCancelTime", getOvertimeCancelTime())
            .append("overtimeNoticeTime", getOvertimeNoticeTime())
            .append("payParams", getPayParams())
            .append("employeeUser", getEmployeeUser())
            .append("customerUser", getCustomerUser())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
